package edu.cs.usask.ca.silver.plugin.rcp.views.projectviewer;

import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;

import edu.cs.usask.ca.silver.api.persistence.StorageI;
import edu.cs.usask.ca.silver.businesslogic.ids.UserID;
import edu.cs.usask.ca.silver.plugin.rcp.components.SilverNameEnums;
import edu.cs.usask.ca.silver.plugin.rcp.components.SilverTreeObject;

public interface ProjectViewI extends IPropertyChangeListener {

	public SilverTreeObject getSilverTreeRoot();

	public void refresh();

	public SilverTreeObject getTreeSelectionAsSilverTreeObject();

	public StorageI getAssociatedStorage();

	public IStructuredSelection getTreeSelection();

	public TreeViewer getTreeViewer();

	public void updateTree();

	public boolean checkIfSelectedIsOfSpecifiedType(
			SilverNameEnums modelprojectid) throws ClassNotFoundException;

	public void addPartPropertyListener(IPropertyChangeListener listener);

	public void resetTreeRoot(SilverTreeObject newRoot);

	public void resetAssociatedStorage(StorageI databaseInstance);
	
	public void resetAssociatedUserToPreferenceInformation();

	public UserID getAssociatedUserID();
	
}
